package com.example.foobar.dao.service.impl;

import com.example.foobar.entity.DaUserOfficialAccount;
import com.example.foobar.mapper.DaUserOfficialAccountMapper;
import com.example.foobar.dao.service.DaUserOfficialAccountDaoService;
import com.example.foobar.param.DaUserOfficialAccountPageParam;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import io.geekidea.springbootplus.framework.common.service.impl.BaseServiceImpl;
import io.geekidea.springbootplus.framework.core.pagination.Paging;
import io.geekidea.springbootplus.framework.core.pagination.PageInfo;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.core.metadata.OrderItem;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import org.springframework.transaction.annotation.Transactional;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Service;
import org.springframework.beans.factory.annotation.Autowired;

/**
 * 用户和公众号关系表 服务实现类
 *
 * @author 郑英奔
 * @since 2021-07-20
 */
@Slf4j
@Service
public class DaUserOfficialAccountDaoServiceImpl extends BaseServiceImpl<DaUserOfficialAccountMapper, DaUserOfficialAccount> implements DaUserOfficialAccountDaoService {

    @Autowired
    private DaUserOfficialAccountMapper daUserOfficialAccountMapper;

    @Transactional(rollbackFor = Exception.class)
    @Override
    public boolean saveDaUserOfficialAccount(DaUserOfficialAccount daUserOfficialAccount)  {
        return super.save(daUserOfficialAccount);
    }

    @Transactional(rollbackFor = Exception.class)
    @Override
    public boolean updateDaUserOfficialAccount(DaUserOfficialAccount daUserOfficialAccount)  {
        return super.updateById(daUserOfficialAccount);
    }

    @Transactional(rollbackFor = Exception.class)
    @Override
    public boolean deleteDaUserOfficialAccount(Long id)  {
        return super.removeById(id);
    }
}
